import multiprocessing
import time

def spawn(num1):
    print ("spawn {}".format(num1))
    while 1:
        pass


if __name__ == '__main__':
    for i in range(31):
        p=multiprocessing.Process(target=spawn,args=(i,))
        p.start()